<?php

error_reporting(~E_WARNING);

$hostName = 'localhost';
$userName = 'root';
$password = '';

mysql_connect($hostName,$userName,$password) or die(mysql_error()." <br>Unable to connnect MYSQL");

mysql_select_db('b19')or die(mysql_error()." <br>Unable to Select DATABASE");

 $insertQuery =
 "INSERT INTO `practice`
 (`name`,`email`,`password`,`added_date`,`status`) VALUES
 ('Rasmus','rasmus@gmail.com','12345abcd',NOW(),0)";

echo $insertQuery,"<br>";

mysql_query($insertQuery)or die(mysql_error()." <br>Unable to INSERT DATA");

// How to select LAst inserted KEY
echo mysql_insert_id();

// How to know number of rows affected
echo mysql_affected_rows();


















































